<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="app">
    <button type="button" @click="print">点击</button>
    <a href="http://www.baidu.com" @click="dodelete">删除</a>
    <button type="button" @click="show('张三')">带参数</button>
</div>
<script type="text/javascript">
    let app = new Vue({
        el:'#app',
        methods:{
            print:function(){
                alert('q确定')

            },
            dodelete:function(){
                let flag = confirm('确定要删除吗')
                if(flag){
                    alert('必须删除')
                }
            },
            show:function(msg){
                alert(msg)

            }
        }
    })
</script>
</body>
</html>
